Skip to content

Conversation

@lkadz
Copy link
Collaborator

@lkadz lkadz commented Nov 30, 2025

Implement Monte Carlo Collisions (MCC) and Diagnostics Suite

Summary

This PR introduces the necessary modules for the core kinetic simulation engine: the Monte Carlo Collision (MCC) module and the suite of Diagnostics tools. It includes comprehensive integration tests to ensure that the fundamental physics (thermalization, isotropization) is implemented correctly and stably.

Key Changes

  • src/test_particle_sim_1d/collisions.py: Implements probabilistic elastic scattering.
  • src/test_particle_sim_1d/diagnostics.py: Adds all necessary measurement functions: compute_global_temperature, compute_component_temperatures, compute_density_profile, and compute_energy_distribution (IEDF/EEDF).
  • tests/test_physics_integration.py: Consolidates and expands verification tests.

Verification

The physics tests confirm the correct operation of the collision and diagnostics pipeline:

  1. Isothermal Relaxation (Thermalization): Confirms that hot ions successfully cool down to the neutral gas temperature.
  2. Velocity Isotropization: Confirms that collisions correctly redistribute energy across velocity components.
  3. Distribution Relaxation (Shape Check): Verifies that the distribution shape relaxes to the theoretical Maxwellian.
  4. Density Integrity: Confirms that the diagnostic compute_density_profile accurately measures the spatial distribution without being corrupted by the collision process.

@lkadz
Copy link
Collaborator Author

lkadz commented Dec 3, 2025

Here are the key assumptions in collisions.py. We can review and refine these as needed.

1. The collision physics

  • Perfectly Elastic: Kinetic energy is conserved in the two-body collision.
  • Isotropic Scattering: The post-collision relative velocity vector is uniformly distributed in the Center of Mass (CoM) frame.

2. The background gas

  • Maxwellian Velocity Distribution: The thermal motion of the neutral gas is modeled by a 3D Maxwell-Boltzmann distribution at temperature $T_{\text{neutral}}$.
  • Uniform Density: The neutral number density is constant throughout the simulation domain.

3. Numerical assumptions

  • Negligible Particle-Particle Collisions: The simulation only accounts for test particle-neutral interactions. Collisions between two test particles are completely ignored. This is valid for low test particle density (or high neutral density)
  • Negligible Neutral Velocity Change: Their velocity ($\mathbf{v}_{\text{neutral}}$) is sampled, but their post-collision velocity is not tracked or updated. The background distribution remains perfectly Maxwellian, unaffected by collisions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants